package com.guigusuqi.survey.utils;


import com.guigusuqi.app.entity.WxUser;

public class UserThreadLocal {
    /*不希望通过new获取UserThreadLocal对象*/
    private UserThreadLocal() {
    }

    //线程变量隔离
    private static final ThreadLocal<WxUser> LOCAL = new ThreadLocal<>();

    public static void put(WxUser wxUser) {
        LOCAL.set(wxUser);
    }

    public static WxUser get() {
        return LOCAL.get();
    }

    public static void remove() {
        LOCAL.remove();
    }
}
